package com.example.connecting_dots_android;

import android.content.Context;
import android.graphics.Canvas;
import android.graphics.Color;
import android.graphics.Paint;
import android.view.View;

public class CustomView extends View {
	private float startX;
	private float startY;
	private float endX;
	private float endY;
	
		 public CustomView(Context context,float startX, float startY, float endX, float endY) {
	           super(context);
	           this.startX = startX;
	           this.startY = startY;
	           this.endX = endX;
	           this.endY = endY;
	       }
		 @Override
	       protected void onDraw(Canvas canvas) {
	           super.onDraw(canvas);
	           Paint paint = new Paint(Paint.ANTI_ALIAS_FLAG);;
	           paint.setColor(Color.BLACK);
	           paint.setStrokeWidth(3);

//               canvas.drawLine(45,67 , 152, 67, paint);
               canvas.drawLine(startX,startY , endX, endY, paint);
	 }
}